package cn.ruituo.dao;

import cn.ruituo.entity.Subject;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.ResultType;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface SubjectDao {
    @Insert("insert into s_subject() values({subjectname,#{classhour},#{gradeid})")
    public int add(Subject s);
    @Insert("insert into s_subject(subjectname,gradeid) values(#{arg0},#{arg1})")
    public int add2(String sname,long gradeid);

    @Select("select * from s_subject")
    @ResultType(Subject.class)
    public List<Subject> findALL();
}
